#include<stdio.h>
#define AN 8
#define BN 9
int main(void){
	int a[AN]  = {1,3,8,23,51,82,99,123};
	int b[BN]  = {2,3,8,25,59,60,71,81 ,145};
	int c[18] = {};
	int *pa = a;
	int *pb = b;
	int j ;
	for(int i = 0;(i < 18)&&((pa < a + AN)||(pb < b + BN));i++){
		c[i] = ((*pa) < (*pb)) ? (*pa++) : (((*pb) < (*pa)) ? (*pb++) : (*pa++,*pb++));
		printf("i = %d   ",i);
		j = i;
	}
	for(int i = 0;(i <= j);i++){
		printf("c[%d]=%d\n",i,c[i]);
		printf("i = %d   ",i);
	}
	return 1;
}
